/* Estilo general */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
}

/* Encabezado común */
header {
  background-color: #ca9c8e;
  color: white;
  padding: 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
}

header .logo {
  font-size: 2em;
  font-weight: normal;
  font-family: 'Berkshire Swash', cursive;
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

header .logo:hover {
  opacity: 0.8;
}

header nav a {
  color: white;
  margin-left: 1em;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s, padding 0.2s;
  padding: 0.4em 0.6em;
  border-radius: 4px;
}

header nav a:hover {
  background-color: white;
  color: #d48bc3;
}

/* Sección destacada (inicio) */
.destacada {
  display: flex;
  padding: 2em;
  background-color: #f4f4f4;
}

.destacada img {
  width: 300px;
  margin-right: 1em;
  border-radius: 5px;
}

/* Galería principal */
.galeria {
  display: flex;
  gap: 1em;
  padding: 1em;
  flex-wrap: wrap;
}

.tarjeta {
  border: 1px solid #ccc;
  padding: 1em;
  width: 200px;
  background-color: white;
  border-radius: 5px;
}

/* Página individual de pyme */
.perfil-pyme {
  padding: 2em;
  max-width: 900px;
  margin: auto;
  background-color: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.foto-principal {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  margin-bottom: 1em;
  border-radius: 5px;
}

.info {
  margin-bottom: 2em;
}

.descripcion {
  font-size: 1.1em;
  line-height: 1.6em;
}

.galeria-fotos {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}

.galeria-fotos img {
  width: calc(50% - 0.5em);
  border-radius: 4px;
}

/* pagina de contacto */

.contacto {
  max-width: 600px;
  margin: 2em auto;
  padding: 2em;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.contacto h2 {
  margin-top: 0;
}

.contacto p {
  margin-bottom: 1.5em;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 0.3em;
  font-weight: bold;
}

input,
textarea {
  padding: 0.7em;
  margin-bottom: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
}

button {
  padding: 0.8em;
  background-color: #d48bc3;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
}

button:hover {
  background-color: #bc7cad;
}

@keyframes deslizante-aparecer {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes deslizante-desaparecer {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-30px); }
}

.mensaje-exito {
  max-width: 600px;
  margin: 0 auto 1.5em auto;
  padding: 1em;
  background-color: #e0ffe0;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  display: none;
  opacity: 0;
}

.mensaje-exito.mostrar {
  animation: deslizante-aparecer 0.6s ease forwards;
}

.mensaje-exito.ocultar {
  animation: deslizante-desaparecer 0.6s ease forwards;
}

.explorar {
  padding: 2em;
}

.categoria {
  margin-bottom: 3em;
}

.categoria h2 {
  margin-bottom: 1em;
  color: #0074D9;
}

a.tarjeta {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

a.tarjeta:hover {
  transform: scale(1.03);
}

.tarjeta img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5em;
}

.tarjeta h3 {
  margin: 0;
  font-size: 1.1em;
  text-align: center;
}